//
//  ACHViewController.m
//  MansApp
//
//  Created by lanou3g on 15/7/13.
//  Copyright (c) 2015年 ACH. All rights reserved.
//

#import "ACHViewController.h"
#import "RightViewController.h"
@interface ACHViewController ()

@end

@implementation ACHViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    CompositeViewController *mainController = [[CompositeViewController alloc]init];
    PrettyViewController *pretty = [[PrettyViewController alloc]init];
    AmusementViewController *amusement = [[AmusementViewController alloc]init];
    MyNoteViewController *myNote = [[MyNoteViewController alloc]init];
    
    UINavigationController *mainNavi = [[UINavigationController alloc]initWithRootViewController:mainController];
    
    UINavigationController *prettyNavi = [[UINavigationController alloc]initWithRootViewController:pretty];
    
    UINavigationController *amusementNavi= [[UINavigationController alloc]initWithRootViewController:amusement];
    
    UINavigationController *myNoteNavi = [[UINavigationController alloc]initWithRootViewController:myNote];
    
#pragma mark - 抽屉
    RightViewController *right = [[RightViewController alloc]init];
    UINavigationController *rightNavi = [[UINavigationController alloc]initWithRootViewController:right];
    MMDrawerController *MMDrawerVC = [[MMDrawerController alloc]initWithCenterViewController:myNoteNavi rightDrawerViewController:rightNavi];
    [MMDrawerVC setOpenDrawerGestureModeMask: MMOpenDrawerGestureModePanningCenterView  ];
    [MMDrawerVC setCloseDrawerGestureModeMask:MMCloseDrawerGestureModeAll];
    [MMDrawerVC setMaximumRightDrawerWidth:kP6width(150) animated:YES completion:nil];
    
    mainController.tabBarItem.title = @"综合社区";
    pretty.tabBarItem.title = @"娱乐天地";
    amusement.tabBarItem.title = @"美图鉴赏";
<<<<<<< HEAD
=======
<<<<<<< HEAD
=======

>>>>>>> 38f1663c41ff0080c034a427ddd68eaf50dd28d2
>>>>>>> b2b96d982947d11d0c72abbae56fde47cfc83674
    MMDrawerVC.tabBarItem.title = @"拾忆空间";

    mainController.tabBarItem.image = [UIImage imageNamed:@"综合"];
    pretty.tabBarItem.image =[UIImage imageNamed:@"娱乐"];
    amusement.tabBarItem.image =[UIImage imageNamed:@"图片"];
    MMDrawerVC.tabBarItem.image = [UIImage imageNamed:@"编辑"];

<<<<<<< HEAD
=======
<<<<<<< HEAD
=======

>>>>>>> 38f1663c41ff0080c034a427ddd68eaf50dd28d2
>>>>>>> b2b96d982947d11d0c72abbae56fde47cfc83674
    [self setViewControllers:@[mainNavi,prettyNavi,amusementNavi,MMDrawerVC]];

    ///
    self.tabBar.tintColor = [UIColor colorWithRed:0.346 green:0.566 blue:0.806 alpha:1.000];
    
    //设置navigationBar的背景图片

    UIImage *image = [UIImage imageNamed:@"article_special_title_bg"];
    
    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault animated:NO];
    [[UINavigationBar appearance]setBackgroundImage:image forBarMetrics:UIBarMetricsDefault];

<<<<<<< HEAD
=======
<<<<<<< HEAD
=======

>>>>>>> b2b96d982947d11d0c72abbae56fde47cfc83674

>>>>>>> 38f1663c41ff0080c034a427ddd68eaf50dd28d2
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
